<div id="engine-content">
    <div class="sidebar-left">
        <div class="project-browse">
            <div class="project-browse-l">项目浏览</div>
            <div class="project-browse-r"><a href="/html2/system#/project-manager" title="系统管理"><i class="icon-engine-set"></i></a></div>
            <div class="clear"></div>
        </div>
        <div ng-if="!currProjcet" class="select-project">
            <div class="select-project-l">在下方选择项目</div>
            <div class="select-project-r">
                <a href="javascript:void(0)" ng-click="toggleSearch()"><i class="icon-engine-search"></i></a>
                <a href="javascript:void(0)"><i class="icon-engine-upward-b" title="进入项目"></i></a>
            </div>
            <div class="clear"></div>
        </div>
        <div ng-if="currProjcet" class="select-project">
            <!--<div class="select-project-l select-project-l-w"><i class="icon-engine-project"></i>{{currProjcet.projectName | maxLength:20}}</div>-->
            <div class="select-project-l">在下方选择项目</div>
            <div class="select-project-r">
                <a href="javascript:void(0)" ng-click="toggleSearch()"><i class="icon-engine-search"></i></a>
                <a href="#/projects/{{currProjcet.id}}"><i class="icon-engine-upward-b" title="进入项目"></i></a>
            </div>
            <div class="clear"></div>
        </div>
        <div ng-show="showSearchProject" class="search-project">
            <input type="text" class="project-name" ng-model="searchKey" placeholder="查找项目名">
        </div>
        <div class="project-title">项目：</div>
        <ul class="project-list">
            <a ng-repeat="project in projects | filter:{'projectName': searchKey}"
               ng-href="#/projects/{{project.id}}" ng-click="selectProject(project)">
                <li><i class="icon-engine-project"></i>{{project.projectName | maxLength:20}}</li>
            </a>
        </ul>
    </div>
    <div class="sidebar-right">
        <div class="sidebar-right-title">开始</div>
        <div class="sidebar-right-content">
            <div class="remind">
                <div class="remind-l"><img src="../../static/images/arrow.png"></div>
                <div class="remind-r">
                    <div class="tu"><i class="icon-engine-remind"></i></div>
                    <div class="text">从左侧边栏打开一个项目和规则包。</div>
                    <div class="clear"></div>
                </div>
                <div class="clear"></div>
            </div>
            <div class="rule-package">
                <div class="rule-package-title">最近使用的规则包</div>
                <g-data-source page="false" allow-auto-load="true" data-source-name="RecentlyPackagesDataSource" url="/grule-manager/recentlyLogs/packages"></g-data-source>
                <a id="permissionsJudgment" data-packageId="{{recentlyPackage.id}}" data-href="#/projects/{{recentlyPackage.projectid}}/packages/{{recentlyPackage.id}}"  ng-repeat="recentlyPackage in dataSources['RecentlyPackagesDataSource'].records">
                    <div class="{{getRecentlyPackageClass(recentlyPackage.id)}}">
                        <div class="package-tu"><i class="icon-engine-package"></i></div>
                        <div class="package-name">{{recentlyPackage.packageName}}</div>
                    </div>
                </a>
                <div class="clear"></div>
            </div>
            <div class="wrong-package">
                <div class="title">
                    <div class="title-l">以下规则包发生异常</div>
                    <div class="title-r"><a href="/html2/system#/logManager">更多>></a></div>
                    <div class="clear"></div>
                </div>
                <div class="wrong-content">
                    <a href="#">
                        <div class="wrong-a" ng-repeat="report in reports">
                            <div class="wrong-a-l"><em>[{{ $index}}]</em>{{report.packageName}}</div>
                            <div class="wrong-a-r">运行{{report.normalCount}}次,平均时间{{report.normalExecutionTime}}ms,发生错误</div>
                            <div class="clear"></div>
                        </div>
                    </a>
                </div>
            </div>
        </div>
    </div>
</div>